<?php
$al_header_file = ARLICLE . 'app/view/elements/header.php';
$al_content_file = ARLICLE . 'app/view/' . $this->file_name . '/' . $this->action . '.php';
$al_footer_file = ARLICLE . 'app/view/elements/footer.php';

if (defined('PLUGIN_DIR')) {
    $al_plugin_header_file = PLUGIN . '/app/view/elements/header.php';
    if (file_exists($al_plugin_header_file)) {
        $al_header_file = $al_plugin_header_file;
    }
    $al_plugin_content_file = PLUGIN . '/app/view/' . $this->file_name . '/' . $this->action . '.php';
    if (file_exists($al_plugin_content_file)) {
        $al_content_file = $al_plugin_content_file;
    }
    $al_plugin_footer_file = PLUGIN . '/app/view/elements/footer.php';
    if (file_exists($al_plugin_footer_file)) {
        $al_footer_file = $al_plugin_footer_file;
    }
}
require $al_header_file;
require $al_content_file;
require $al_footer_file;
?>
